package com.example.beidouapplication;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import androidx.annotation.Nullable;

import com.example.beidouapplication.viewmodel.Key;
import com.example.beidouapplication.viewmodel.KeyEvent;

public class FragmentBeidouZihuiP4 extends Fragment {

    static FragmentBeidouZihuiP4 instance = new FragmentBeidouZihuiP4();


    Button btn;


    @Override
    public View onCreateView(
            LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState
    ) {

        View inflate = inflater.inflate(R.layout.beidouzihui_p4, container, false);
        return inflate;
    }


    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        btn = getActivity().findViewById(R.id.btn_zihui_cancel_p4);
        btn.setOnClickListener(view -> {
            Menu.keyQueue.add(new KeyEvent(Key.Esc, 1));
        });
    }


}